<%-- 
    Document   : emailToTeacher
    Created on : 6-jan-2013, 13:48:33
    Author     : Serife
--%>



<%@page import="javax.swing.DefaultListModel"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <link href="../style/general.css" type="text/css" rel="Stylesheet">
        <link href="/style/student.css" type="text/css" rel="Stylesheet">
        <link href="../style/admin.css" type="text/css" rel="Stylesheet">

        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>

        <!-- include jQuery UI  From Google Code-->
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>


        <script type="text/javascript">
            $(document).ready(function(){
                $("#menu a").hover(function() {
                    $(this).stop().animate({ backgroundColor: "#4e88b2"}, 800);
                },function() {
                    $(this).stop().animate({ backgroundColor: "#504e4e" }, 800);
                });
				
            }); 
        </script>

        <jsp:useBean id="inhoud" scope="application" class="models.Bean" />   
        <jsp:setProperty name="inhoud" property="language" value="<%= models.Bean.getLanguage()%>" />

        <title>
            Three 2 Learn | Email
        </title>
    </head>
    <body>
        <div id="header">
            <div id="topmenu">
                <div id="topmenu">
                    <ul class="login">
                        <li><img src="style/logo32L.png"/></li>
                        <li><a href="/language?lang=nl" title="Nederlands"><img src="images/flags/nl.png"></a></li>
                        <li><a href="/language?lang=en" title="English"><img src="images/flags/uk.png"></a></li>
                                <c:choose>
                                    <c:when test="${loggedin eq 'true'}">
                                    <li><a href="/logout" id="toggleLogout" >
                                            <jsp:setProperty name="inhoud" property="key" value="LogOut" />
                                            <jsp:getProperty name="inhoud" property="key" />
                                        </a></li>
                                    <li><a href="/${omgeving}" >
                                            <jsp:setProperty name="inhoud" property="key" value="BackTo" />
                                            <jsp:getProperty name="inhoud" property="key" /> ${omgeving}
                                            <jsp:setProperty name="inhoud" property="key" value="TheEnvironment" />
                                            <jsp:getProperty name="inhoud" property="key" />
                                        </a></li>
                                    <li><h2><jsp:setProperty name="inhoud" property="key" value="Welcome" />
                                            <jsp:getProperty name="inhoud" property="key" />, ${user.firstName} ${user.lastName}</h2></li>
                                        </c:when>
                                <c:otherwise>
                                <li><a href="#" id="toggleLogin" >
                                        <jsp:setProperty name="inhoud" property="key" value="Login" />
                                        <jsp:getProperty name="inhoud" property="key" />
                                    </a></li>
                                </c:otherwise>
                            </c:choose>

                    </ul>
                </div>

            </div>

            <div class="middle">
                <div id="menu">
                    <ul>
                        <li><a href="/index">
                                <jsp:setProperty name="inhoud" property="key" value="Homepage" />
                                <jsp:getProperty name="inhoud" property="key" />
                            </a></li>
                        <li><a href="courses.jsp">
                                <jsp:setProperty name="inhoud" property="key" value="Courses" />
                                <jsp:getProperty name="inhoud" property="key" />
                            </a></li>

                        <li><a href="three2Learn.jsp">Three2Learn</a></li>
                        <li><a href="information.jsp">

                                <jsp:setProperty name="inhoud" property="key" value="Information" />

                                <jsp:getProperty name="inhoud" property="key" />
                            </a></li>
                        <li><a href="faq.jsp">

                                <jsp:setProperty name="inhoud" property="key" value="FAQ" />
                                <jsp:getProperty name="inhoud" property="key" />
                            </a></li>

                        <li><a href="contact.jsp" class="lastItem">Contact</a></li>
                    </ul>
                </div>
            </div>
        </div>
        <div id="subcontainer">     
            <center>
                <h1>Contact</h1>
                <a href="/student"><img src="style/icons/return.png"/></a>
                
                    <c:if test="${not empty melding}">
                        </br>${melding}
                    </c:if>
            </center>
            <form action="/emailTeacher" method="post">
                <table style="margin: auto" id="settingstable">
                    <tr>
                        <td>
                            <jsp:setProperty name="inhoud" property="key" value="ListOfTeachers" />
                            <jsp:getProperty name="inhoud" property="key" />
                        </td>
                        <td>
                            <div id="teacherContainer">
                                <select required="required" name="teacherList" multiple="multiple" style="width:500px; max-height:200px">
                                    <c:choose>                                              
                                        <c:when test="${not empty teachers}">    
                                            <c:forEach var="tempTeacher" items="${teachers}">
                                                <option value="${tempTeacher.email}">${tempTeacher.firstName} ${tempTeacher.lastName} </option>
                                            </c:forEach>            
                                        </c:when> 
                                    </c:choose>
                                </select>
                            </div> 
                        </td>
                    </tr> 
                    <tr>
                        <td>
                            <jsp:setProperty name="inhoud" property="key" value="Subject" />
                            <jsp:getProperty name="inhoud" property="key" />:
                        </td>
                        <td><input required="required" title="Enter subject" id="subject" name="subject" type="text" size="80" /></td>
                    </tr>      
                    <tr>
                        <td><jsp:setProperty name="inhoud" property="key" value="YourEmail" />
                            <jsp:getProperty name="inhoud" property="key" />:
                        </td>
                        <td><input required="required" title="Enter email" id="emailFrom" name="emailFrom" type="text" size="80" /></td>
                    </tr>
                    <tr>
                        <td><td colspan="2"><TEXTAREA required="required" id="content" name="content" ROWS=10 Cols=62 ></TEXTAREA></td> 
                    </tr>
                    <tr>
                        <td><td text-align:center><input type="submit" value="Send"/></td>
                    </tr>      
                </table>        
            </form>
        </div>

    </body>
</html>